home *** CD-ROM | disk | FTP | other *** search
/ Champak 66 / Vol 66.iso / games / bluep.swf / scripts / frame_30 / DoAction.as
Text File  |  2013-04-24  |  5KB  |  136 lines

  1. function setup()
  2. {
  3.    cacheItAllNow();
  4.    whichPageToGo = "";
  5.    _root.final_score_txt.text = _global.userScore;
  6.    moveMe(_root.end_main_menu,125.8,_root.end_main_menu._y,0.75);
  7.    moveMe(_root.replay_game,209.8,_root.replay_game._y,0.75);
  8.    moveMe(_root.submit_score,293.8,_root.submit_score._y,0.75);
  9.    moveMe(_root.text1,127.1,_root.text1._y,0.75);
  10.    moveMe(_root.textBar,132.5,_root.textBar._y,0.75);
  11.    moveMe(_root.text2,198,_root.text2._y,0.75);
  12.    moveMe(_root.final_score_txt,145.8,_root.final_score_txt._y,0.75);
  13. }
  14. function run()
  15. {
  16.    mouseCurserAdjust();
  17. }
  18. function mouseCurserAdjust()
  19. {
  20.    _root.crosshair._x = _xmouse;
  21.    _root.crosshair._y = _ymouse;
  22. }
  23. function moveIt(mc, xVal, yVal, durInSecs)
  24. {
  25.    var _loc3_ = _global.FPSforTweenClass;
  26.    var _loc4_ = mc._x;
  27.    var _loc5_ = mc._y;
  28.    myTweening = new mx.transitions.Tween(mc,"_x",mx.transitions.easing.Strong.easeIn,_loc4_,xVal,durInSecs,true);
  29.    myTweening = new mx.transitions.Tween(mc,"_y",mx.transitions.easing.Strong.easeIn,_loc5_,yVal,durInSecs,true);
  30.    myTweening.FPS = _loc3_;
  31.    myTweening.FPS = _loc3_;
  32.    myTweening.onMotionFinished = function()
  33.    {
  34.    };
  35. }
  36. function moveItWithCondition(mc, xVal, yVal, durInSecs)
  37. {
  38.    var _loc4_ = _global.FPSforTweenClass;
  39.    var _loc5_ = mc._x;
  40.    var _loc6_ = mc._y;
  41.    myTweening = new mx.transitions.Tween(mc,"_x",mx.transitions.easing.Strong.easeIn,_loc5_,xVal,durInSecs,true);
  42.    myTweening = new mx.transitions.Tween(mc,"_y",mx.transitions.easing.Strong.easeIn,_loc6_,yVal,durInSecs,true);
  43.    myTweening.FPS = _loc4_;
  44.    myTweening.FPS = _loc4_;
  45.    myTweening.onMotionFinished = function()
  46.    {
  47.       _root.gotoAndPlay(whichPageToGo);
  48.    };
  49. }
  50. function __rankz_send__(par1, par2, par3, par4)
  51. {
  52.    par227 = new LoadVars();
  53.    par228 = new LoadVars();
  54.    par227.flashkey = par2;
  55.    par227.SU0249 = par1;
  56.    par227.bmFtZTE = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par3);
  57.    par227.c2NvcmUx = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par4 + "j%e%a%n%s");
  58.    par227.flashkey = par227.flashkey.split("=").join("");
  59.    par227.SU0249 = par227.SU0249.split("=").join("");
  60.    par228.onLoad = function(success)
  61.    {
  62.       if(success)
  63.       {
  64.          trace(par228.msg);
  65.       }
  66.       else
  67.       {
  68.          trace(par228.loaded);
  69.       }
  70.    };
  71.    par227.sendAndLoad("http://rankz.armorbot.com/submit/",par228,"POST");
  72. }
  73. function cacheItAllNow()
  74. {
  75.    _root.end_main_menu.cacheAsBitmap = true;
  76.    _root.replay_game.cacheAsBitmap = true;
  77.    _root.submit_score.cacheAsBitmap = true;
  78.    _root.textBar.cacheAsBitmap = true;
  79.    _root.text1.cacheAsBitmap = true;
  80.    _root.text2.cacheAsBitmap = true;
  81.    _root.crosshair.cacheAsBitmap = true;
  82. }
  83. stop();
  84. var whichPageToGo;
  85. _root.onMouseDown = function()
  86. {
  87. };
  88. _root.end_main_menu.onPress = function()
  89. {
  90.    _root.titleDuringGame.gotoAndPlay("fadeOut");
  91.    moveIt(_root.end_main_menu,_root.end_main_menu._x,_root.end_main_menu._y + 400,0.5);
  92.    moveIt(_root.submit_score,_root.submit_score._x,_root.submit_score._y + 400,0.5);
  93.    moveIt(_root.text1,_root.text1._x - 350,_root.text1._y,0.5);
  94.    moveIt(_root.text2,_root.text2._x + 350,_root.text2._y,0.5);
  95.    _root.final_score_txt.text = "";
  96.    _root.user_name_txt.text = "";
  97.    moveIt(_root.textBar,_root.textBar._x,_root.textBar._y + 300,0.5);
  98.    moveItWithCondition(_root.replay_game,_root.replay_game._x,_root.replay_game._y + 400,0.5);
  99.    whichPageToGo = "main_menu";
  100. };
  101. _root.replay_game.onPress = function()
  102. {
  103.    _root.titleDuringGame.gotoAndPlay("fadeOut");
  104.    moveIt(_root.end_main_menu,_root.end_main_menu._x,_root.end_main_menu._y + 400,0.5);
  105.    moveIt(_root.submit_score,_root.submit_score._x,_root.submit_score._y + 400,0.5);
  106.    moveIt(_root.text1,_root.text1._x - 350,_root.text1._y,0.5);
  107.    moveIt(_root.text2,_root.text2._x + 350,_root.text2._y,0.5);
  108.    _root.final_score_txt.text = "";
  109.    _root.user_name_txt.text = "";
  110.    moveIt(_root.textBar,_root.textBar._x,_root.textBar._y + 300,0.5);
  111.    moveItWithCondition(_root.replay_game,_root.replay_game._x,_root.replay_game._y + 400,0.5);
  112.    whichPageToGo = "reset";
  113. };
  114. _root.submit_score.onPress = function()
  115. {
  116.    if(_root.user_name_txt.text != "")
  117.    {
  118.       if(!_global.cheat)
  119.       {
  120.          bXlnYW1lX25hbWVfdmFyaWFibGU = _root.user_name_txt.text;
  121.          bXlnYW1lX3Njb3JlX3ZhcmlhYmxl = _global.dataVector.Get();
  122.          _root.__rankz_send__("MjE5NWolZSVhJW4lcw==","UHdlV1pBeGI=",bXlnYW1lX25hbWVfdmFyaWFibGU,bXlnYW1lX3Njb3JlX3ZhcmlhYmxl);
  123.          getUrl("http://rankz.armorbot.com/blu3p/", "_blank");
  124.       }
  125.       moveIt(_root.end_main_menu,_root.end_main_menu._x,_root.end_main_menu._y + 400,0.5);
  126.       moveIt(_root.submit_score,_root.submit_score._x,_root.submit_score._y + 400,0.5);
  127.       moveIt(_root.text1,_root.text1._x - 350,_root.text1._y,0.5);
  128.       moveIt(_root.text2,_root.text2._x + 350,_root.text2._y,0.5);
  129.       _root.final_score_txt.text = "";
  130.       _root.user_name_txt.text = "";
  131.       moveIt(_root.textBar,_root.textBar._x,_root.textBar._y + 300,0.5);
  132.       moveItWithCondition(_root.replay_game,_root.replay_game._x,_root.replay_game._y + 400,0.5);
  133.       whichPageToGo = "main_menu";
  134.    }
  135. };
  136.